The disclosed embodiments of the present invention relate to forwarding packets, and more particularly, to an output queue of a multi-plane network device and related method of managing the output queue having multiple packet linked lists.
A network switch is a computer networking device that links different electronic devices. For example, the network switch receives an incoming packet generated from a source electronic device connected to it, and transmits an outgoing packet derived from the received packet to one or more destination electronic devices for which the received packet is meant to be received. In general, the network switch has a packet buffer for buffering packet data of packets received from ingress ports, and forwards the packets stored in the packet buffer through egress ports.
Besides, when a packet is received from one of the ingress ports, the packet is further enqueued to one output queue. To relax the memory requirement of the output queue, a single linked list structure is employed to serve in one output queue. When the network switch has multiple planes, multiple packets may be enqueued into the same or different output queues in one clock cycle. Also, multiple packets may be dequeued from linked lists in one clock cycle. Since multiple enqueue and dequeue operations are required to be accomplished in one clock cycle, a multi-port memory is generally required to buffer the packet linked list. For example, considering a two-plane network switch, a 2R2W static random access memory (SRAM) is used to store the packet linked list for output queues. However, the 2R2W SRAM has large chip area and high cost. When the network switch has n planes (n>2), using nRnW SRAMs would not be a cost-efficient solution for the output queue design.